package org.ssc.cinema.feign;


import org.ssc.cinema.entity.Tickethouse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "tickethouse",url = "http://localhost:9000")
public interface TickethouseFeign {

    @PostMapping("ticket/cinemaLogin")
    Object cinemaLogin(@RequestParam("cname") String cname,
                       @RequestParam("password") String password);

    @PostMapping("/ticket/screen")
    int screen(@RequestBody Tickethouse tickethouse);

    @GetMapping("/ticket/getTicketsByMoviename/{moviename}")
    List<Tickethouse> getTicketsByMoviename(@PathVariable("moviename")String moviename);
}
